Repository navigation
Move the examples to CGP v0.8.0 and add web-app - #1
Merged
Merged
Conversation
expression: wire every context with the open statement and path keys, removing the per-operator bundles in add_mult_code; import provider dependencies with #[uses] and the abstract types with #[use_type]; derive CgpData on the language enums; check Times in every context. builder: read configuration as #[implicit] arguments instead of six getter traits; use #[uses] and #[use_type(HasErrorType.Error)]; derive CgpData on the output and application structs; dispatch the multi-target builder with open HandlerComponent; and rename the BuildAnthroicAndChatGptApp marker to BuildAnthropicAndChatGptApp. transfer: import the request getters' abstract types with #[use_type(... in App)]. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
transfer: make a self-transfer through UseMockedApp a no-op, returning once the sender's debit is known to succeed, instead of letting the credit overwrite the debit and add the amount. builder: enable sqlx's runtime-tokio feature so pools open without a panic; read OPENAI_API_KEY with env::var and raise the error in BuildDefaultOpenAiClient and App::new_with_default instead of calling the panicking Client::from_env; and give both main functions a mode=rwc connection string so they create db.sqlite. web-app: stop CreatePostWithPostgres from filtering spam itself in the stages that wrap it in FilterSpamMessage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… full namespace.rs gains a TestApp that shares the Postgres core and swaps in dummy content filters, the ProductionExtraComponents and DummyExtraComponents bundles behind @app.extra, and the flat namespace step as a commented block. Its AI filter bundle is renamed AiContentFilterComponents, the name the worked example uses. fine_grained.rs, namespace.rs, and default_impls.rs now check all nine components on every context. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Override `cgp` and `cgp-error-anyhow` with the `cgp` repository's `main` branch instead of a local `../cgp` checkout, so the workspace builds from a fresh clone, and lock it at the commit carrying the fixed error backends. anyhow moves to 1.0.104, the minimum `cgp-error-anyhow` now requires. The local-path entries stay commented out for testing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The repository had an empty README, so a visitor found no index of the five crates. It now lists each crate with what it shows and how to run it, and links the website's project pages. The transfer walkthrough drops the word "capability" for CGP constructs and replaces its prose em dashes with punctuation that names the relationship.
The workspace set no description, categories, or homepage, so its five crates published with none of them. Each crate now describes the example it holds, and the workspace names the project page and a category.
Each component, provider, and getter the examples define now carries a doc comment, so a reader of the crate docs sees what the construct is for without opening the source. The `transfer` crate's existing `//` notes become `///` docs on the items they describe.
Every component, type, getter, and provider in the expression, web-app, and greet crates now carries a doc comment saying what it is for, so the crate docs explain the examples instead of listing their pieces bare. Each line names what that module's item does and links the website page that walks through it, and the hand-written expansion in `greet` gains a module doc saying what it reproduces.
The repository had no workflow, so its build and test ran only on a contributor's machine. Two jobs now run the README's Building commands on the stable release `rust-toolchain.toml` pins, which the workspace declares as its `rust-version`. The workspace patches `cgp` to the repository's `main` branch by git URL, so the jobs fetch that branch and need network access.
`cgp::prelude` now carries only the names users write, so the `FromVariant` trait and the wiring traits in the hand-written greet expansion come from their modules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`cgp::prelude` no longer exports `cgp_handler`'s traits and component keys or `UseContext`, so the examples import them from `cgp::extra::handler` and `cgp::core::component`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The file gives agents the rules every CGP repository shares, sends them to the `/cgp` skill and the knowledge base to learn CGP, points to the knowledge base's section on this project before a change to what it describes, and names the build and test commands CI runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README's Building section now sends contributors and agents to AGENTS.md, as the other CGP repositories' READMEs do, and AGENTS.md names the knowledge base's record of the website section that explains this project, which a change to the code it shows must update. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The universal writing rule now asks for natural writing in documents people outside the project read, such as a repository or crate README, beside point-first writing for internal prose. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The writing rules name the `/point-first-writing` skill, which no CGP repository publishes, so an outside contributor's agent cannot load it. The rules keep the two styles and ask for the skill only when it is available. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`cargo update` moves the lockfile to the newest versions each requirement allows, which also moves the patched `cgp` to the newest commit on its `main`, and every requirement on an external crate rises to the version now locked, so a build never resolves an older release than the one the checks ran against. Each change stays within semver compatibility. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The workspace requires cgp and cgp-error-anyhow 0.8.0 and drops the [patch.crates-io] section that took both from the cgp repository's main by git URL. The lockfile changes only the cgp crates. The README's Building section shows the patch to add for testing a local cgp checkout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Building section says what the patch is for before showing it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
soareschen
marked this pull request as ready for review
November 18, 2026 11:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
[claude-opus-5-5] This PR moves the examples to CGP v0.8.0 and adds a
web-appcrate. The workspace takescgpandcgp-error-anyhow0.8.0 from crates.io, and each crate uses the release's idioms: namespaces and theopenstatement for wiring,#[use_type]for abstract types, and#[default_impl]for per-type defaults.web-appwires one social-media backend four ways, from one trait per domain up to namespace defaults.The repository also gains a README that describes each crate and how to run it, an
AGENTS.md, cargo metadata on every crate, and aTestsworkflow that builds and tests the workspace on every push and pull request.The PR fixes two defects as well: a self-transfer in
transfer's mocked app no longer adds the amount, andbuilderopens its database pools and reads its API key without panicking.Impact
Merging fixes the website's links to
web-app. The Projects pages link this repository'smainfor their source, andmainlacks the crate until this PR merges.